<template>
  <view>
    <view class="container">
      <image src="http://qichong-1256206693-1256206693.cos.ap-nanjing.myqcloud.com/upload/20210617/51d008497eefd5e7a04e69b18ad3b0d7.png" mode="widthFix"></image>
      <h1>支付成功！</h1>
      <view class="container_btn" @click="examineOrders">
        查看订单
      </view>
      <text @click="navSw">返回首页</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        id: ''
      };
    },
    onLoad(option) {
      this.id = option.id
    },
    methods: {
      navSw() {
        uni.switchTab({
          url: '/pages/tabbar/index/index'
        })
      },
      examineOrders() {
        uni.redirectTo({
          url: '/subpkg/myorder/myorder?id=' + this.id
        })
      }
    }
  }
</script>

<style lang="scss">
  .container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 520rpx;
    // height: 500rpx;
    display: flex;
    flex-direction: column;
    align-items: center;


    image {
      width: 234rpx;
      height: 238rpx;
    }

    h1 {
      color: rgba(0, 0, 0, 0.7);
      font-size: 48rpx;
      margin: 27rpx 0 51rpx;
    }

    .container_btn {
      height: 97rpx;
      width: 100%;
      background-color: rgba(253, 211, 56, 1);
      border-radius: 226rpx;
      color: rgba(61, 61, 61, 1);
      font-size: 36rpx;
      font-weight: 500;
      text-align: center;
      line-height: 97rpx;
      margin-bottom: 27rpx;
    }

    text {
      color: rgba(61, 61, 61, 0.6);
      font-size: 32rpx;
    }
  }
</style>
